#ifndef SDBULLET_H
#define SDBULLET_H

#include <vector>
#include <math.h>
#include "../src/chipmunk.h"
#include "sdObject.h"

class sdBullet : public sdObject {
private:
    cpFloat ttl_; //Ticks to live
    
public:

    inline sdBullet(cpFloat ttl, cpBody* body) : sdObject(body), ttl_(ttl) {}
   
    inline void update(cpFloat ticks) {if(ttl_ > 0) {ttl_ -= ticks;}}
    inline bool alive(return ttl_ > 0.0;)
};

#endif
